from requests_xml import XMLSession
def xpath():
    session = XMLSession()
    r = session.get("https://www.nasa.gov/rss/dyn/lg_image_of_the_day.rss")
    item = r.xml.xpath("//link")
    result = []
    for i in item:
        result.append(i.text)
    assert  all('https://www.nasa.gov/' in link for link in result)
    assert 'https://www.nasa.gov/image-detail/iss068e075336/' in result


xpath()